package com.owc.dao;

import com.owc.domain.dto.admin.DrawDTO;
import com.owc.domain.entity.DrawFlow;

import java.util.List;

import com.owc.domain.vo.admin.DrawQueryVo;
import org.apache.ibatis.annotations.Param;

public interface DrawFlowMapper extends BaseMapper<DrawFlow, Long> {

    DrawFlow selectByDrawFlowId(@Param("drawFlowId") String drawFlowId);

    void updateStatusByTransferId(@Param("drawFlowId") String drawFlowId, @Param("status") Integer status);

    void updateRemake(@Param("drawFlowId") String drawFlowId, @Param("message") String message);

    void updateTxHash(@Param("drawFlowId") String drawFlowId, @Param("txnHash") String txnHash);

    DrawFlow selectByHash(@Param("txhash") String txhash);

    void updateStatusSuccessByDrawFlowId(@Param("flowId") String flowId, @Param("status") Integer status);

    List<DrawDTO> selectByQueryModel(@Param("queryModel") DrawQueryVo drawQueryVo);

    /**
     * 获取正在进行中的划转订单
     * @param userId  用户ID
     * @param tokenId 代币ID
     */
    List<DrawFlow> selectProcessOrderByUserIdAndTokenId(@Param("userId") Long userId, @Param("tokenId") Long tokenId);
}